package com.yanqu.road.server.cmd.scene;

import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.scene.SceneMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_SCENE_QUIT, desc = "退出场景")
public class QuitSceneCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        SceneMgr.quitScene(packet.getPlayerId(), System.currentTimeMillis(), true);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
